<!DOCTYPE html>
<!-- 左右移 -->
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
var count = 0;
function fun_left(){
	var selectLeft=document.getElementById("selectLeft");
	var selectRight=document.getElementById("selectRight");
	for(i=0;i<selectLeft.length;i++){
        if(selectLeft.options[i].selected){
        	addOption(selectRight,selectLeft.options[i]);
        	selectLeft.remove(i);
            i--;
        }
    }
}
function addOption(_select,_option){
	var opt=document.createElement("option");
	opt.text=_option.text;
	_select.add(opt,null)
}

function fun_right(){
	var select=document.getElementById("selectRight");
	for(i=0;i<select.length;i++){
        if(select.options[i].selected){
            select.remove(i);
            i--;
        }
    }
}
</script>
</head>
<body>
<select id="selectLeft" multiple="multiple" style="height: 300px;width: 200px">
		<option>1</option>
		<option>2</option>
		<option>3</option>
		<option>4</option>
		<option>5</option>
		<option>6</option>
		<option>7</option>
		<option>8</option>
		<option>9</option>
	</select>
	<input type="button" onclick="fun_left()" value="-->">
	<input type="button" onclick="fun_right()" value="<--">
	<select id="selectRight" multiple="multiple" style="height: 300px;width: 200px">
	</select>
</body>
</html>